#  这种方法是错的，题中的要求不是这样的
class Solution:
    def maxDepth(self, root: 'Node') -> int:
        count = 0
        ansList = []
        tmplist = []
        for v in root:
            if v != null:
                tmplist.append(v)
            if count == 0 and v == null:
                ansList.extend(tmplist)
                count = len(tmplist)
                tmplist = []
            if v == null:
                count -= 1
        return len(ansList)



class Solution:
    def maxDepth(self, root: 'Node') -> int:
        if not root:
            return 0
        if root.children == []:
            return 1
        tmplist = [self.maxDepth(v) for v in root.children]
        return max(tmplist) + 1